/**
 * 
 */
package com.ar4j.spring;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Decorates autowired read only instances or active record classes with specifications as to what qualifier
 * should be used for discovering spring beans (DataSource, PlatformTransactionManager, etc.) and
 * what database schema (if any) a record represents.
 */
@Target({ElementType.FIELD, ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface ActiveRecordQualifier {

  /**
   * @return the qualifier string value, if any, to be used to retrieve beans from the spring application context
   */
  String springQualifier() default "";
  
  /**
   * @return the RDBMS schema name that a record operates on
   */
  String schemaName() default "";
  
}
